//路由页面
import React, { Suspense } from 'react';
import { HashRouter as Router, Switch } from 'react-router-dom';

//路由表文件
import routes from './config';
//路由配置
import RouterView from './routerView';
import './index.scss'
import MyFooter from '../components/myfooter';

//写路由表
const App = () => (
    <Router>
        <MyFooter />
        <div className="content">
            <Suspense fallback={<div>Loading...</div>}>
                <Switch>
                    <RouterView routes={routes} />
                </Switch>
            </Suspense>
        </div>
    </Router>
)

export default App;